package game.buffovi;

public abstract class Buff 
{
	protected int duration;
	
	private game.Character caster;
	
	protected abstract void DoBuff(game.Character target);
	
	public final void PerformBuff(game.Character target)
	{
		if(duration > 0) 
		{
			DoBuff(target);
			duration --;
		}
	}
	
	public boolean isActive()
	{
		return duration > 0;
	}
	
	public Buff(int duration,game.Character caster)
	{
		this.duration = duration;
		this.caster = caster;
	}
	
	public game.Character getCaster()
	{
		return caster;
	}
	
	
}
